package com.example.sp01.entity;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "stu")
public class stu {
    @Id
    @Column(name = "Sno")//对应数据库中表的字段名
    private Integer sno;
    
    @Column(name = "Ssex")
    private String ssex; // 性别（1-男，2-女）
    
    @Column(name = "Sname")
    private String sname; // 姓名
    
    @Column(name = "Sheight")
    private Double sheight; // 身高（cm）
    
    @Column(name = "Sweight")
    private Double sweight; // 体重（kg）
    
    @Column(name = "Sunit")
    private String sunit; // 排-班

    public stu() {}

    public stu(Integer sno, String ssex, String sname, Double sheight, Double sweight, String sunit) {
        this.sno = sno;
        this.ssex = ssex;
        this.sname = sname;
        this.sheight = sheight;
        this.sweight = sweight;
        this.sunit = sunit;
    }

    // Getter和Setter
    public Integer getSno() {
        return sno;
    }

    public void setSno(Integer sno) {
        this.sno = sno;
    }

    public String getSsex() {
        return ssex;
    }

    public void setSsex(String ssex) {
        this.ssex = ssex;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public Double getSheight() {
        return sheight;
    }

    public void setSheight(Double sheight) {
        this.sheight = sheight;
    }

    public Double getSweight() {
        return sweight;
    }

    public void setSweight(Double sweight) {
        this.sweight = sweight;
    }

    public String getSunit() {
        return sunit;
    }

    public void setSunit(String sunit) {
        this.sunit = sunit;
    }
}